package com.esri.core.renderer;

import com.esri.core.internal.util.d;
import org.codehaus.jackson.JsonGenerator;

/* loaded from: classes.dex */
public class RampDefinition {
    private int a;
    private int b;
    private Algorithm c;

    /* loaded from: classes.dex */
    public enum Algorithm {
        HSV("esriHSVAlgorithm"),
        CIELab("esriCIELabAlgorithm"),
        LabLCh("esriLabLChAlgorithm");
        
        String a;

        Algorithm(String str) {
            this.a = str;
        }

        public String getValue() {
            return this.a;
        }

        @Override // java.lang.Enum
        public String toString() {
            return this.a;
        }

        public static Algorithm fromString(String str) {
            if ("esriHSVAlgorithm".equals(str)) {
                return HSV;
            }
            if ("esriCIELabAlgorithm".equals(str)) {
                return CIELab;
            }
            if ("esriLabLChAlgorithm".equals(str)) {
                return LabLCh;
            }
            return null;
        }
    }

    public RampDefinition(int i, int i2, Algorithm algorithm) {
        this.a = i;
        this.b = i2;
        this.c = algorithm;
    }

    public int getFromColor() {
        return this.a;
    }

    public void setFromColor(int i) {
        this.a = i;
    }

    public int getToColor() {
        return this.b;
    }

    public void setToColor(int i) {
        this.b = i;
    }

    public Algorithm getAlgorithm() {
        return this.c;
    }

    public void setAlgorithm(Algorithm algorithm) {
        this.c = algorithm;
    }

    /* JADX INFO: Access modifiers changed from: protected */
    public void toJson(JsonGenerator jsonGenerator) throws Exception {
        d.b(jsonGenerator, "fromColor", this.a);
        d.b(jsonGenerator, "toColor", this.b);
        jsonGenerator.writeStringField("algorithm", this.c.getValue());
    }

    public String toString() {
        return "RampDefinition [fromColor=" + this.a + ", toColor=" + this.b + ", Algorithm=" + this.c + "]";
    }
}
